<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>z-index</title>
    <style type="text/css">
        div{
            width: 200px;
            height: 40px;
        }
        .a{
            position: relative;
            background-color: #c3fffb;
            border: 3px solid #3962fe;
            /* 数值越大 层级越高 */
            z-index: 2;
        }
        .b{
            position: relative;
            background-color: #c3fffb;
            border: 3px solid #3962fe;
            top: -30px;
            left: 50px;
            z-index: 4;
        }
        .c{
            position: relative;
            background-color: #c3fffb;
            border: 3px solid #3962fe;
            top: -50px;
            left: 100px;
            z-index: 3;
        }
    </style>
</head>
<body>
    <div class="a">A</div>
    <div class="b">B</div>
    <div class="c">C</div>
</body>
</html>